package com.tanhua.manage.config;

import org.springframework.context.annotation.Bean;
import org.springframework.data.mongodb.MongoDbFactory;
import org.springframework.data.mongodb.MongoTransactionManager;

/**
 * @Description: 使用MongoDB事务需要的配置类
 * @Author: baixiao
 * @Date: Created in 19:20 2021/1/6
 * @ModifiedBy:
 */
// @Configuration
public class TransactionConfig {
    @Bean
    public MongoTransactionManager transactionManager(MongoDbFactory factory) {
        return new MongoTransactionManager(factory);
    }
}
